﻿//-----------------------------------------------------------------------
// <copyright file="Index.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the Index class.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Engine.Models.ClosedWorld
{
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Windows.Markup;
    using Collections;

    /// <summary>
    /// Represents a relation within the runtime model.
    /// </summary>
    [ContentProperty("Fields")]
    public class Index : ElementBase
    {
        /// <summary>
        /// Initializes a new instance of the Index class.
        /// </summary>
        public Index()
        {
            this.Fields = new Fields();
        }

        /// <summary>
        /// Gets or sets the ID of the index.
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// Gets the fields in the index.
        /// </summary>
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public IList<Field> Fields { get; private set; }
    }
}
